package com.spring.demo4.eg7;

import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.core.Ordered;
import org.springframework.core.type.AnnotationMetadata;

/**
 * DeferredImportSelector是ImportSelector的子接口，扩展了延迟导入和指定导入类的处理顺序的功能
 *
 * @author vhans
 */
public class DeferredImportSelector1 implements DeferredImportSelector, Ordered {
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{
                Configuration2.class.getName()
        };
    }

    @Override
    public int getOrder() {
        return 2;
    }
}
